home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / tex / style / misc / ltugboat.sty < prev    next >
Text File  |  1995-11-25  |  13KB  |  436 lines

  1. \def\fileversion{v1.02 ch FMi}
  2. \def\filedate{6 Feb 90}
  3. % Change history at bottom of file
  4.  
  5.  
  6. %               *****   LTUGBOAT.STY    *****
  7. %
  8. %
  9. %       Incorporates ideas and elements from these TUGboat authors:
  10. %               Adrian Clark
  11. %               Frank Mittelbach
  12. %               Rainer Sch\"opf
  13.  
  14.  
  15. %  Stop here if this file has been read already
  16.  
  17. \ifx\tugstyloaded@\relax
  18.  \endinput\else\let\tugstyloaded@\relax\fi
  19.  
  20. \typeout{Document Style `ltugboat' \fileversion \space\space <\filedate>}
  21.  
  22. % **********************************************************************
  23. %
  24. %  Macros common to ltugboat.sty and tugboat.sty
  25.  
  26.  
  27. \input tugboat.com
  28.  
  29.  
  30. % ***********************************************************************
  31. %
  32. %  Fonts
  33.  
  34. \font\sevbf=cmbx7
  35. \font \svtnsfb=cmssbx10 scaled \magstep3        % for section titles;
  36.  
  37. \font \twlsfb=cmssbx10 scaled \magstep1         % definition of \LaTeX
  38. \newfam\sectitlefam                             % requires a family
  39. \textfont\sectitlefam=\svtnsfb
  40. \scriptfont\sectitlefam=\twlsfb
  41.  
  42. \font\tenuit=cmu10                              % for Editor's Note
  43.  
  44. % specials for new font selection (FMi)
  45. \ifx\selectfont\undefined
  46.  
  47. %  redo definition of 10pt from latex (lfonts), to install \sevbf as
  48. %  \*scriptfont of \bffam
  49. \toks0=\expandafter{\xpt\scriptfont\bffam\sevbf \scriptscriptfont\bffam\sevbf}
  50. \xdef\xpt{\the\toks0}
  51.  
  52. \else
  53. \def\tensl{\family{cmr}\series{m}\shape{sl}\size{10}{12pt}\selectfont}
  54. \fi
  55.  
  56.  
  57. % ***********************************************************************
  58. %
  59. %  normal TUGboat dimensions, glue values, penalties
  60.  
  61. \@twosidetrue           % for odd/even asymmetry in running heads
  62. \sloppy                 % make those columns justify
  63. %\flushbottom           % but ensure they line up
  64. \columnsep 1.5pc        % space between columns
  65. \columnwidth 18.75pc    % width of each column
  66. \parindent \normalparindent     % paragraph indent
  67. \parskip 0pt            % no inter-paragraph space
  68. \leftmargini 2em        % unchanged
  69. \leftmarginv .5em       % unchanged
  70. \leftmarginvi .5em      % unchanged
  71. \oddsidemargin 0pt      % was 42pt
  72. \evensidemargin 0pt     % was 84pt
  73. \topmargin -2.5pc       % was 0pt
  74. \headheight 12pt        % height of running head, unchanged
  75. \headsep 20pt           % distance between header and text
  76. \marginparwidth 48pt    % don't use marginal notes
  77. \marginparsep 10pt      %  in TUGboat
  78. \textheight 54pc        % height of text on page
  79. \textwidth 39pc         % total width of a page
  80. \twocolumn              % two columns %FMi placed after setting of \textwidth
  81.  
  82.  
  83. \partopsep=\z@
  84. \topsep=3pt plus1pt minus1pt
  85. \parsep=3pt plus 1pt minus 1pt
  86. \itemsep=\parsep
  87.  
  88.  
  89. \def\@normalsize{\@setsize\normalsize{12pt}\xpt\@xpt
  90. \abovedisplayskip=3pt plus 3pt minus 1pt \belowdisplayskip=\abovedisplayskip
  91. \abovedisplayshortskip=\z@ plus3pt \belowdisplayshortskip=1pt plus3pt minus1pt}
  92.  
  93. \def\small{\@setsize\small{11pt}\ixpt\@ixpt
  94. \abovedisplayskip=2.5pt plus2.5pt minus1pt\belowdisplayskip=\abovedisplayskip
  95. \abovedisplayshortskip=\z@ plus2pt \belowdisplayshortskip=1pt plus2pt minus1pt}
  96.  
  97. \def\footnotesize{\@setsize\footnotesize{12pt}\xpt\@xpt
  98. \abovedisplayskip=3pt plus 3pt minus 1pt \belowdisplayskip=\abovedisplayskip
  99. \abovedisplayshortskip=\z@ plus3pt \belowdisplayshortskip=1pt plus3pt minus1pt}
  100.  
  101.  
  102. % ***********************************************************************
  103. %
  104. %  Lists
  105.  
  106. \def\@listi{\leftmargin\leftmargini\parsep=1pt plus 1pt minus 1pt
  107.   \itemsep=\parsep}
  108.  
  109. \def\@listii{\leftmargin\leftmarginii
  110.   \labelwidth=\leftmarginii \advance\labelwidth-\labelsep
  111.   \topsep=2pt plus 1pt minus 1pt
  112.   \parsep=1pt plus 1pt minus 1pt
  113.   \itemsep=\parsep}
  114.  
  115. \def\@listiii{\leftmargin=\leftmarginiii
  116.   \labelwidth=\leftmarginiii \advance\labelwidth-\labelsep
  117.   \topsep=1pt plus 1pt minus 1pt
  118.   \parsep=\z@
  119.   \itemsep=\topsep}
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126. % ***********************************************************************
  127. %
  128. %  Titles, authors, addresses, signatures
  129.  
  130. \def\sectitlefont{\fam\sectitlefam\svtnsfb\baselineskip\stbaselineskip}
  131. \setbox\T@stBox=\hbox{\sectitlefont O}
  132. \newdimen\stfontheight          \stfontheight=\ht\T@stBox
  133. \def \sectitle#1{\SecTitletrue \def\s@ctitle{#1}}
  134.  
  135. \newcount\authornumber
  136. \authornumber=0
  137.  
  138. \def\author#1{%
  139.   \global\advance\authornumber\@ne
  140.   \expandafter\def\csname theauthor\number\authornumber\endcsname
  141.       {\ignorespaces#1\unskip}%
  142.   \expandafter\let\csname theaddress\number\authornumber\endcsname\relax
  143.   \expandafter\let\csname thenetaddress\number\authornumber\endcsname\relax
  144.   }
  145.  
  146. \def\address#1{%
  147.   \expandafter\def\csname theaddress\number\authornumber\endcsname
  148.       {\ignorespaces#1\unskip}}
  149.  
  150. \def\network#1{\def\@network{#1: }}
  151. \def\netaddress{%
  152.   \begingroup
  153.   \let\@network\relax
  154.   \@ifnextchar[{\@netaddress}{\@netaddress[]}%
  155.   }
  156.  
  157. {\makeactive\@
  158.  \gdef\netaddrat{\makeactive\@\def@{\char"40\discretionary{}{}{}}}
  159.  \makeactive\%
  160.  \gdef\netaddrpercent{\makeactive\%\def%{\char"25\discretionary{}{}{}}}
  161. }
  162.  
  163. \def\@netaddress[#1]{#1\@sanitize\makeactive\@\makeactive\%\@@netaddress}
  164.  
  165. \def\@@netaddress#1{%
  166.   \toks@{#1}%
  167.   \ifx\@network\relax \def\@@network{}%
  168.   \else \def\@@network{\@network}\fi
  169.   \expandafter\xdef\csname thenetaddress\number\authornumber\endcsname
  170.     {{\noexpand\rm\@@network}%
  171.      {\noexpand\netaddrat\noexpand\netaddrpercent\noexpand\net
  172.       \ignorespaces\the\toks@\unskip}}%
  173.   \endgroup
  174.   }
  175.  
  176. \def\net{\tt}
  177.  
  178. %  Overrides to default author and signature formats
  179.  
  180. \def\authorlist#1{\def\@author{#1}}
  181. \def\@author{\@defaultauthorlist}
  182.  
  183.  
  184. \def\maketitle{\par
  185.  \ifdim\PreTitleDrop > 0pt
  186.    \loop
  187.    \ifdim \PreTitleDrop > \textheight
  188.      \vbox{}\vfil\eject
  189.      \advance\PreTitleDrop by -\textheight
  190.    \repeat
  191.    \vbox to \PreTitleDrop{}
  192.    \global\PreTitleDrop=0pt
  193.  \fi
  194.  \begingroup
  195.  \setcounter{footnote}{0}
  196.  \def\thefootnote{\fnsymbol{footnote}}
  197.  \def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}}
  198.  \@maketitle
  199.  \@thanks
  200.  \endgroup
  201.  \setcounter{footnote}{0}
  202. % \let\maketitle\relax
  203. % \let\@maketitle\relax
  204.  \gdef\@thanks{}\gdef\@author{}\gdef\@title{}%
  205. %\let\thanks\relax
  206.  }
  207.  
  208. \def\@maketitle{\ifSecTitle \global\SecTitlefalse
  209.                 \@sectitle{\s@ctitle}%
  210.         \else \vskip\AboveTitleSkip
  211.                 \kern\topskip
  212.                 \hrule height\z@ depth\z@ width 10pt
  213.                 \kern-\topskip
  214.                 \kern-\strulethickness
  215.                 \hrule height\strulethickness depth\z@
  216.                 \kern\medskipamount
  217.         \fi
  218.         {\nohyphens \interlinepenalty\@M
  219.         \setbox0=
  220.           \hbox{\let\thanks\@gobble
  221.                 \let\\=\quad
  222.                 \let\and=\quad
  223.                 \ignorespaces\@author}%
  224.         {\noindent\bf\raggedright\ignorespaces\@title\endgraf}%
  225.         \ifdim \wd0 < 5pt               % omit if author is null
  226.         \else \nobreak \vskip 4pt       % 4pt + \BelowTitleSkip = \baselineskip
  227.                 {\leftskip=\normalparindent
  228.                  \def\and{\unskip\\}%
  229.                  \noindent\@author\endgraf}%
  230.         \fi \nobreak \vskip\BelowTitleSkip }}
  231.  
  232.  
  233. \def\abstract{
  234. \section*{Abstract}
  235. }
  236. \def\endabstract{}
  237.  
  238.  
  239. %  Redefine style of section headings to look more like TUGboat.
  240. %  Start with definitions from art10.sty .  (Only \section correct so far.)
  241. %
  242. %  \vskip 8pt \vskip\parskip before; \vskip 4pt after
  243. %  Negative beforeskip suppresses following parindent.
  244.  
  245. \def\section{\@startsection {section}{1}{\z@}{-8pt}{4pt}%
  246.         {\normalsize\bf\raggedright}}
  247.  
  248. \def\subsection{\@startsection{subsection}{2}{\z@}{-8pt}{4pt}%
  249.         {\normalsize\bf\raggedright}}
  250.  
  251. \def\subsubsection
  252.         {\@startsection{subsubsection}{3}{\z@}{-8pt}{4pt}{\normalsize\bf}}
  253.  
  254. \def\paragraph{\@startsection
  255.  {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}}
  256.  
  257. \def\subparagraph{\@startsection
  258.  {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus
  259.  .2ex}{-1em}{\normalsize\bf}}
  260.  
  261. %       Modify \appendix from art10.sty, to add ``Appendix''
  262. %       1 May 89 Mittelach comments that we need to put ``Appendix''
  263. %         somewhere other than \thesection if \tableofcontents is used.
  264. %\def\appendix{\par
  265. % \setcounter{section}{0}
  266. % \setcounter{subsection}{0}
  267. % \def\thesection{Appendix \Alph{section}}}
  268.  
  269.  
  270. \def\l@part#1#2{\addpenalty{\@secpenalty}
  271.  \addvspace{2.25em plus 1pt} \begingroup
  272.  \@tempdima 3em \parindent \z@ \rightskip \z@ \parfillskip \z@
  273.  {\large \bf \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
  274.  \nobreak \endgroup}
  275. \def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt}
  276. \@tempdima 1.5em \begingroup
  277.  \parindent \z@ \rightskip \z@  % article style makes \rightskip > 0
  278.  \parfillskip \z@
  279.  \bf \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil
  280. \nobreak\hbox to\@pnumwidth{\hss #2}\par
  281.  \endgroup}
  282.  
  283.  
  284. \def \EdNote{{\tenuit Editor's note:\enspace }}
  285.  
  286.  
  287. % ***********************************************************************
  288. %
  289. %  Footnotes
  290.  
  291. \long\def\@makefntext#1{\parindent 1em\noindent\hbox to 2em{}%
  292.   \llap{\@makefnmark}\null$\;$#1}
  293. %  \llap{$^{\@thefnmark}\,$}#1}
  294.  
  295.  
  296. % ***********************************************************************
  297. %
  298. %  Figures
  299.  
  300. \def\fnum@figure{{\bf Figure \thefigure}}
  301.  
  302.  
  303.  
  304.  
  305. % ***********************************************************************
  306. %
  307. %  Quotes
  308.  
  309. \def\quote{\list{}{\rightmargin.5\leftmargin}\item[]}
  310.  
  311. %       From Dominik Wujastyk's font article.  First paragraph of a quotation
  312. %       will not be indented, and right margin is decreased for narrow columns.
  313. \renewcommand{\quotation}{\list{}{\listparindent 1.5em
  314.         \rightmargin.5\leftmargin\parsep 0pt plus 1pt}\item[]}
  315.  
  316.  
  317. % ***********************************************************************
  318. %
  319. %  Signature
  320.  
  321. %  Moved to TUGboat.com
  322.  
  323. % ***********************************************************************
  324. %
  325. %  Running heads, output routine
  326.  
  327. \def \rtitlex{\def\tubfont{\normalsize\rm}\TUB, \volx }
  328.  
  329. \def\PrelimDraftfooter{%
  330.   \dlap{\kern\textheight\kern3pc
  331.         \rlap{\hbox to \pagewd{\midrtitle\hfil\midrtitle}}
  332.   }}
  333.  
  334. % registration marks; these are temporarily inserted in the running head
  335. \def\MakeRegistrationMarks{}
  336. \def\UseTrimMarks{%
  337.   \def\MakeRegistrationMarks{%
  338.     \ulap{\rlap{%
  339.        \vbox{\dlap{\vbox to\trimlgt{\vfil\botregister}}%
  340.              \topregister\vskip \headmargin \vskip 10pt}}}}%
  341.   }
  342.  
  343. \def\@oddhead{\MakeRegistrationMarks\PrelimDraftfooter
  344.   \hbox{}\rm\rtitlex\qquad\midrtitle \hfil \thepage}
  345. \def\@evenhead{\MakeRegistrationMarks\PrelimDraftfooter
  346.   \rm \thepage\hfil\midrtitle\qquad\rtitlex}
  347. \def\@oddfoot{}
  348. \def\@evenfoot{}
  349.  
  350. \def\ps@headings{}
  351. \pagestyle{headings}
  352.  
  353.  
  354. % ***********************************************************************
  355. %
  356. %  Macros for Mittelbach's self-documenting style
  357.  
  358. \def\SelfDocumenting{%
  359.   \setlength\textwidth{31pc}
  360.   \onecolumn
  361.   \parindent 0pt
  362.   \parskip 2pt plus 1pt minus 1pt
  363.   \oddsidemargin 8pc
  364.   \evensidemargin 8pc
  365.   \toks@\expandafter{\@oddhead}%
  366.   \xdef\@oddhead{\hss\hbox to \pagewd{\the\toks@}}%
  367.   \toks@\expandafter{\@evenhead}%
  368.   \xdef\@evenhead{\hss\hbox to \pagewd{\the\toks@}}%
  369.   \def\ps@titlepage{}%
  370. }
  371.  
  372.  
  373.  
  374. % ***********************************************************************
  375. %
  376. %  MISCELLANEOUS defs for compatibility with tugboat.sty
  377.  
  378. \newif\ifFirstPar       \FirstParfalse
  379.  
  380. \newdimen\pagewd        \pagewd=39pc
  381. \newdimen\trimwd        \trimwd=\pagewd
  382. \newdimen\trimlgt       \trimlgt=11in
  383. \newdimen\headmargin    \headmargin=3.5pc
  384. \def\smc{\sc}
  385. \def\ninepoint{\small}
  386.  
  387.  
  388.  
  389. %*************************************************************************
  390. %
  391. %       Start-up
  392.  
  393. \setcounter{page}{1} %FMi reset to 1
  394. \PrelimDrafttrue
  395.  
  396. \endinput
  397.  
  398.  
  399.  
  400. % **********************************************************************
  401. %
  402. %   Change history
  403. %
  404.  
  405. 12 Feb 90    v1.02
  406. modified definition of \@makefntext; now uses \@makefnmark (as one
  407.    might expect)
  408.  
  409.  6 Feb 90    v1.01
  410. removed "\font\manual=manfnt"; tugboat.com already sets \font\manual=logo10
  411. adjusted definition of \netaddress to remove mis-timed \@sanitize-ation
  412.  
  413. 29 Nov 89       v1.00
  414. changed \titlefont to \sectitlefont
  415. added setting of \baselineskip to defintion of \sectitlefont
  416. changed \TUBparindent to \normalparindent (already in tugboat.com)
  417. removed additions of amcsc* fonts
  418. new definitions of \ragged... in tugboat.com include \nohyphens
  419. moved most of section title material to tugboat.com
  420. moved writing mechanism and multiple document handling to local .drv file
  421. redefined \author to be consistent with tugboat.sty
  422. added \address, \netaddress
  423. moved \signature stuff to tugboat.com
  424. made titles raggedright
  425.  
  426.  
  427. 20 Oct 89       v0.53
  428. Zeroed \@signature for multiple documents
  429.  
  430. 19 Oct 89       v0.52
  431. Moved \rtitlex to tugboat.com
  432.  
  433. 18 Oct 89       v0.51
  434. Disallowed hyphenations in \section and \subsection
  435. ə
  436.